Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add inputest package #19377

Merged
merged 1 commit into from
Jun 25, 2020
Merged

Add inputest package #19377

merged 1 commit into from
Jun 25, 2020

Conversation

urso
Copy link

@urso urso commented Jun 24, 2020

  • Enhancement

What does this PR do?

This change adds the package filebeat/input/v2/internal/inputest.
The inputest package provides helpers for writing input
related tests. For now it is internal only, but might be exported if we
find it helpful in other places.

The current state of the full implementation can be seen here and sample inputs based on the new API.

The full list of changes will include:

This PR only introduces some testing helpers only.

Why is it important?

Add testing support for v2 inputs.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
    - [ ] I have made corresponding changes to the documentation
    - [ ] I have made corresponding change to the default configuration files
    - [ ] I have added tests that prove my fix is effective or that my feature works
    - [ ] I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Related issues

The v2/internal/input test package provides helpers for writing input
related tests. For now it is internal only, but might be exported if we
find it helpful in other places.
@urso urso added review Filebeat Filebeat needs_backport PR is waiting to be backported to other branches. Project:Filebeat-Input-v2 Team:Services (Deprecated) Label for the former Integrations-Services team v7.9.0 labels Jun 24, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-services (Team:Services)

@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Jun 24, 2020
@elasticmachine
Copy link
Collaborator

💔 Tests Failed

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #19377 opened]

  • Start Time: 2020-06-24T19:11:06.756+0000

  • Duration: 57 min 39 sec

Test stats 🧪

Test Results
Failed 1
Passed 3982
Skipped 672
Total 4655

Test errors

Expand to view the tests failures

  • Name: Build and Test / Filebeat oss / test_reload_same_config – test_reload_inputs.Test

    • Age: 1
    • Duration: 16.317
    • Error Details: Timeout waiting for 'cond' to be true. Waited 15 seconds.

Steps errors

Expand to view the steps failures

  • Name: Make -C filebeat testsuite
    • Description: make -C filebeat testsuite

    • Duration: 32 min 42 sec

    • Start Time: 2020-06-24T19:35:30.446+0000

    • log

Log output

Expand to view the last 100 lines of log output

[2020-06-24T20:07:16.655Z] 		at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:265)
[2020-06-24T20:07:16.655Z] 		at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)
[2020-06-24T20:07:16.655Z] 		at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)
[2020-06-24T20:07:16.655Z] 		at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
[2020-06-24T20:07:16.655Z] 		at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[2020-06-24T20:07:16.655Z] 		at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[2020-06-24T20:07:16.655Z] 		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[2020-06-24T20:07:16.655Z] 		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[2020-06-24T20:07:16.655Z] Caused: hudson.FilePath$TunneledInterruptedException
[2020-06-24T20:07:16.655Z] 	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3075)
[2020-06-24T20:07:16.655Z] 	at hudson.remoting.UserRequest.perform(UserRequest.java:212)
[2020-06-24T20:07:16.655Z] 	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
[2020-06-24T20:07:16.655Z] 	at hudson.remoting.Request$2.run(Request.java:369)
[2020-06-24T20:07:16.655Z] 	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
[2020-06-24T20:07:16.655Z] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[2020-06-24T20:07:16.655Z] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[2020-06-24T20:07:16.655Z] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[2020-06-24T20:07:16.655Z] 	at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:93)
[2020-06-24T20:07:16.655Z] Caused: java.lang.InterruptedException: java.lang.InterruptedException: no matches found within 10000
[2020-06-24T20:07:16.655Z] 	at hudson.FilePath.act(FilePath.java:1071)
[2020-06-24T20:07:16.655Z] 	at hudson.FilePath.act(FilePath.java:1058)
[2020-06-24T20:07:16.655Z] 	at hudson.FilePath.validateAntFileMask(FilePath.java:2684)
[2020-06-24T20:07:16.655Z] 	at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:265)
[2020-06-24T20:07:16.655Z] 	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)
[2020-06-24T20:07:16.655Z] 	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)
[2020-06-24T20:07:16.655Z] 	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
[2020-06-24T20:07:16.655Z] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[2020-06-24T20:07:16.655Z] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[2020-06-24T20:07:16.655Z] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[2020-06-24T20:07:16.655Z] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[2020-06-24T20:07:16.655Z] 	at java.lang.Thread.run(Thread.java:748)
[2020-06-24T20:07:16.655Z] No artifacts found that match the file pattern "**/build/TEST*.out". Configuration error?
[2020-06-24T20:07:17.124Z] + curl -sSLo codecov https://codecov.io/bash
[2020-06-24T20:07:17.387Z] + FILE=auditbeat/build/coverage/full.cov
[2020-06-24T20:07:17.387Z] + [ -f auditbeat/build/coverage/full.cov ]
[2020-06-24T20:07:17.387Z] + FILE=filebeat/build/coverage/full.cov
[2020-06-24T20:07:17.387Z] + [ -f filebeat/build/coverage/full.cov ]
[2020-06-24T20:07:17.387Z] + FILE=heartbeat/build/coverage/full.cov
[2020-06-24T20:07:17.387Z] + [ -f heartbeat/build/coverage/full.cov ]
[2020-06-24T20:07:17.387Z] + FILE=libbeat/build/coverage/full.cov
[2020-06-24T20:07:17.387Z] + [ -f libbeat/build/coverage/full.cov ]
[2020-06-24T20:07:17.387Z] + FILE=metricbeat/build/coverage/full.cov
[2020-06-24T20:07:17.387Z] + [ -f metricbeat/build/coverage/full.cov ]
[2020-06-24T20:07:17.387Z] + FILE=packetbeat/build/coverage/full.cov
[2020-06-24T20:07:17.387Z] + [ -f packetbeat/build/coverage/full.cov ]
[2020-06-24T20:07:17.387Z] + FILE=winlogbeat/build/coverage/full.cov
[2020-06-24T20:07:17.387Z] + [ -f winlogbeat/build/coverage/full.cov ]
[2020-06-24T20:07:17.387Z] + FILE=journalbeat/build/coverage/full.cov
[2020-06-24T20:07:17.387Z] + [ -f journalbeat/build/coverage/full.cov ]
[2020-06-24T20:07:18.896Z] Failed in branch Filebeat oss
[2020-06-24T20:07:20.597Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19377/src/github.com/elastic/beats
[2020-06-24T20:07:20.936Z] + find . -type f -name TEST*.xml -path */build/* -delete
[2020-06-24T20:07:20.958Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19377/src/github.com/elastic/beats/Lint
[2020-06-24T20:07:21.109Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19377/src/github.com/elastic/beats/Filebeat-x-pack-Mac-OS-X
[2020-06-24T20:07:21.259Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19377/src/github.com/elastic/beats/Filebeat-Mac-OS-X
[2020-06-24T20:07:21.407Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19377/src/github.com/elastic/beats/Filebeat-x-pack-Windows
[2020-06-24T20:07:21.554Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19377/src/github.com/elastic/beats/Filebeat-Windows
[2020-06-24T20:07:21.701Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19377/src/github.com/elastic/beats/Filebeat-x-pack
[2020-06-24T20:07:21.850Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19377/src/github.com/elastic/beats/Filebeat-oss
[2020-06-24T20:07:22.285Z] + cat
[2020-06-24T20:07:22.285Z] + /usr/local/bin/runbld ./runbld-script
[2020-06-24T20:07:22.285Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-06-24T20:07:28.896Z] runbld>>> runbld started
[2020-06-24T20:07:28.896Z] runbld>>> 1.6.12/f45d832f2ba0aa2722ab4ec1fda8ad140f027f8b
[2020-06-24T20:07:31.447Z] runbld>>> The following profiles matched the job 'Beats/beats-beats-mbp/PR-19377' in order of occurrence in the config (last value wins).
[2020-06-24T20:07:32.390Z] runbld>>> Debug logging enabled.
[2020-06-24T20:07:32.390Z] runbld>>> Storing result
[2020-06-24T20:07:32.390Z] runbld>>> Store result: created {:total 2, :successful 2, :failed 0} 1
[2020-06-24T20:07:32.390Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200624200732-D3319280
[2020-06-24T20:07:32.390Z] runbld>>> Adding system facts.
[2020-06-24T20:07:33.341Z] runbld>>> Adding vcs info for the latest commit:  c7fe545d4a85f4fac958fc5006634fbdf54d882e
[2020-06-24T20:07:33.341Z] runbld>>> >>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>>
[2020-06-24T20:07:33.341Z] runbld>>> Adding /usr/lib/jvm/java-8-openjdk-amd64/bin to the path.
[2020-06-24T20:07:33.602Z] + echo 'Processing JUnit reports with runbld...'
[2020-06-24T20:07:33.602Z] Processing JUnit reports with runbld...
[2020-06-24T20:07:33.865Z] runbld>>> <<<<<<<<<<<< SCRIPT EXECUTION END <<<<<<<<<<<<
[2020-06-24T20:07:33.865Z] runbld>>> DURATION: 29ms
[2020-06-24T20:07:33.865Z] runbld>>> STDOUT: 40 bytes
[2020-06-24T20:07:33.865Z] runbld>>> STDERR: 49 bytes
[2020-06-24T20:07:33.865Z] runbld>>> WRAPPED PROCESS: SUCCESS (0)
[2020-06-24T20:07:33.865Z] runbld>>> Searching for build metadata in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19377/src/github.com/elastic/beats
[2020-06-24T20:07:35.268Z] runbld>>> Storing build metadata: 
[2020-06-24T20:07:35.268Z] runbld>>> Adding test report.
[2020-06-24T20:07:35.268Z] runbld>>> Searching for junit test output files with the pattern: TEST-.*\.xml$ in: /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19377/src/github.com/elastic/beats
[2020-06-24T20:07:36.657Z] runbld>>> Found 13 test output files
[2020-06-24T20:07:37.604Z] runbld>>> Test output logs contained: Errors: 1 Failures: 0 Tests: 4655 Skipped: 648
[2020-06-24T20:07:37.864Z] runbld>>> Storing result
[2020-06-24T20:07:37.864Z] runbld>>> FAILURES: 1
[2020-06-24T20:07:38.125Z] runbld>>> Store result: updated {:total 2, :successful 2, :failed 0} 2
[2020-06-24T20:07:38.125Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200624200732-D3319280
[2020-06-24T20:07:38.386Z] runbld>>> Email notification disabled by environment variable.
[2020-06-24T20:07:38.386Z] runbld>>> Slack notification disabled by environment variable.
[2020-06-24T20:07:44.646Z] Running on worker-395930 in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19377
[2020-06-24T20:07:44.776Z] [INFO] getVaultSecret: Getting secrets
[2020-06-24T20:07:44.843Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-06-24T20:07:47.139Z] + chmod 755 generate-build-data.sh
[2020-06-24T20:07:47.139Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19377/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19377/runs/1 FAILURE 3398967
[2020-06-24T20:07:47.140Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19377/runs/1/steps/?limit=10000 -o steps-info.json
[2020-06-24T20:07:48.590Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19377/runs/1/tests/?status=FAILED -o tests-errors.json
[2020-06-24T20:07:48.590Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19377/runs/1/log/ -o pipeline-log.txt

@urso
Copy link
Author

urso commented Jun 25, 2020

Filebeat failed in system test: test_reload_inputs.Test.test_reload_same_config

This PR only adds some helpers that are not used yet. Relavant go tests did run through.

@urso urso merged commit f124da8 into elastic:master Jun 25, 2020
@urso urso deleted the add-input-v2-inputest branch June 25, 2020 15:21
urso pushed a commit to urso/beats that referenced this pull request Jul 7, 2020
(cherry picked from commit f124da8)
@urso urso removed the needs_backport PR is waiting to be backported to other branches. label Jul 7, 2020
urso pushed a commit that referenced this pull request Jul 8, 2020
melchiormoulin pushed a commit to melchiormoulin/beats that referenced this pull request Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Filebeat Filebeat Project:Filebeat-Input-v2 review skip-test-plan Team:Services (Deprecated) Label for the former Integrations-Services team v7.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants